3.299 \(\int \frac{\tan ^2(c+d x) (a B+b B \tan (c+d x))}{a+b \tan (c+d x)} \, dx\)

Optimal. Leaf size=16 \[ \frac{B \tan (c+d x)}{d}-B x \]

[Out]

-(B*x) + (B*Tan[c + d*x])/d

________________________________________________________________________________________

Rubi [A]  time = 0.0116281, antiderivative size = 16, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 34, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.088, Rules used = {21, 3473, 8} \[ \frac{B \tan (c+d x)}{d}-B x \]

Antiderivative was successfully verified.

[In]

Int[(Tan[c + d*x]^2*(a*B + b*B*Tan[c + d*x]))/(a + b*Tan[c + d*x]),x]

[Out]

-(B*x) + (B*Tan[c + d*x])/d

Rule 21

Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> Dist[(b/d)^m, Int[u*(c + d*v)^(m +
 n), x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c +
 d*x, a + b*x])

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \frac{\tan ^2(c+d x) (a B+b B \tan (c+d x))}{a+b \tan (c+d x)} \, dx &=B \int \tan ^2(c+d x) \, dx\\ &=\frac{B \tan (c+d x)}{d}-B \int 1 \, dx\\ &=-B x+\frac{B \tan (c+d x)}{d}\\ \end{align*}

Mathematica [A]  time = 0.0096435, size = 25, normalized size = 1.56 \[ B \left (\frac{\tan (c+d x)}{d}-\frac{\tan ^{-1}(\tan (c+d x))}{d}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(Tan[c + d*x]^2*(a*B + b*B*Tan[c + d*x]))/(a + b*Tan[c + d*x]),x]

[Out]

B*(-(ArcTan[Tan[c + d*x]]/d) + Tan[c + d*x]/d)

________________________________________________________________________________________

Maple [A]  time = 0.022, size = 26, normalized size = 1.6 \begin{align*}{\frac{B\tan \left ( dx+c \right ) }{d}}-{\frac{B\arctan \left ( \tan \left ( dx+c \right ) \right ) }{d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(d*x+c)^2*(a*B+b*B*tan(d*x+c))/(a+b*tan(d*x+c)),x)

[Out]

B*tan(d*x+c)/d-1/d*B*arctan(tan(d*x+c))

________________________________________________________________________________________

Maxima [A]  time = 1.66764, size = 30, normalized size = 1.88 \begin{align*} -\frac{{\left (d x + c\right )} B - B \tan \left (d x + c\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^2*(a*B+b*B*tan(d*x+c))/(a+b*tan(d*x+c)),x, algorithm="maxima")

[Out]

-((d*x + c)*B - B*tan(d*x + c))/d

________________________________________________________________________________________

Fricas [A]  time = 1.73815, size = 39, normalized size = 2.44 \begin{align*} -\frac{B d x - B \tan \left (d x + c\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^2*(a*B+b*B*tan(d*x+c))/(a+b*tan(d*x+c)),x, algorithm="fricas")

[Out]

-(B*d*x - B*tan(d*x + c))/d

________________________________________________________________________________________

Sympy [A]  time = 0.82752, size = 36, normalized size = 2.25 \begin{align*} \begin{cases} - B x + \frac{B \tan{\left (c + d x \right )}}{d} & \text{for}\: d \neq 0 \\\frac{x \left (B a + B b \tan{\left (c \right )}\right ) \tan ^{2}{\left (c \right )}}{a + b \tan{\left (c \right )}} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)**2*(a*B+b*B*tan(d*x+c))/(a+b*tan(d*x+c)),x)

[Out]

Piecewise((-B*x + B*tan(c + d*x)/d, Ne(d, 0)), (x*(B*a + B*b*tan(c))*tan(c)**2/(a + b*tan(c)), True))

________________________________________________________________________________________

Giac [A]  time = 1.48349, size = 30, normalized size = 1.88 \begin{align*} -\frac{{\left (d x + c\right )} B - B \tan \left (d x + c\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^2*(a*B+b*B*tan(d*x+c))/(a+b*tan(d*x+c)),x, algorithm="giac")

[Out]

-((d*x + c)*B - B*tan(d*x + c))/d